# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.Spectrum.V1explorer.Model.GeoLocationEllipse do
  @moduledoc """
  A \&quot;point\&quot; with uncertainty is represented using the Ellipse shape.

  ## Attributes

  - center (GeoLocationPoint): A required geo-spatial point representing the center of the ellipse. Defaults to: `null`.
  - orientation (float()): A floating-point number that expresses the orientation of the ellipse, representing the rotation, in degrees, of the semi-major axis from North towards the East. For example, when the uncertainty is greatest along the North-South direction, orientation is 0 degrees; conversely, if the uncertainty is greatest along the East-West direction, orientation is 90 degrees. When orientation is not present, the orientation is assumed to be 0. Defaults to: `null`.
  - semiMajorAxis (float()): A floating-point number that expresses the location uncertainty along the major axis of the ellipse. May be required by the regulatory domain. When the uncertainty is optional, the default value is 0. Defaults to: `null`.
  - semiMinorAxis (float()): A floating-point number that expresses the location uncertainty along the minor axis of the ellipse. May be required by the regulatory domain. When the uncertainty is optional, the default value is 0. Defaults to: `null`.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :center => GoogleApi.Spectrum.V1explorer.Model.GeoLocationPoint.t(),
          :orientation => any(),
          :semiMajorAxis => any(),
          :semiMinorAxis => any()
        }

  field(:center, as: GoogleApi.Spectrum.V1explorer.Model.GeoLocationPoint)
  field(:orientation)
  field(:semiMajorAxis)
  field(:semiMinorAxis)
end

defimpl Poison.Decoder, for: GoogleApi.Spectrum.V1explorer.Model.GeoLocationEllipse do
  def decode(value, options) do
    GoogleApi.Spectrum.V1explorer.Model.GeoLocationEllipse.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Spectrum.V1explorer.Model.GeoLocationEllipse do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
